package com.tungse.study.rpc.framework.register;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author Tungse
 */
public class LocalRegister {
    private static final Map<String, Class<?>> localRegister = new ConcurrentHashMap<>();

    public static void register(String serviceName, Class<?> service) {
        localRegister.put(serviceName, service);
    }
    public static Class<?> getService(String serviceName) {
        return localRegister.get(serviceName);
    }
}
